class VText extends VNode{
    constructor(dom,component) {
        super(dom)
        this._component = component || this;
        this._data = dom.data.trim()

    }

    render(){
        let str = this._data.trim()
        let n = str.indexOf('[[')
        let count = 2;
        let count2 = 0,end;
        if( n > -1 ){
            for (let i = n+2; i < str.length; i++) {
                if( str[i] === ']'){
                    (count2 === 0)&& count--;
                }else if(str[i] === '[' ){
                    (count2 === 0)&& count++;
                }else if( str[i] === '\'' ){
                    if( count2 === 0 ){
                        count2 ++
                    }else{
                        count2--
                    }
                }
                if( count === 0 ){
                    end = i;
                    break;
                }
            }
        }
        console.log(str)
        console.log(str.substring(n+2, end-1));
    }
}